package com.sservice.model.vo;

import com.sservice.model.entity.Commission;
import lombok.Data;

/**
 * Created by suweiming on 2017/12/20.
 */

@Data
public class CommissionVo extends Commission {

    /***
     * 当前页
     */
    private int page = 0;
    private String dateStart; //开始日期
    private String dateEnd;//截止日期
    private String keyword;//


    /**
     * 每页显示数量
     */
    private int size = 15;

    //数据类型码
    //默认
    public static Integer BUSINESS_COMMISSION_TYPE1 = 10;
    //软著
    public static Integer BUSINESS_SOFTWARE_SHOP_COMMISSION_TYPE1 = 11;
    //高企
    public static Integer BUSINESS_PS_COMMISSION_TYPE1 = 12;
    //双软
    public static Integer BUSINESS_DOUBLE_SOFT_COMMISSION_TYPE1 = 13;
    public static Integer BUSINESS_PARTNERID_COMMISSION_TYPE1 = 14;//合伙人佣金

    //业务类型码
    //领红包获取红包
    public static Integer DATA_TYPE1_RED_ENVELOPE = 10; //红包
    public static Integer DATA_TYPE1_ORDER_PARTNER = 11; // 合伙人分享佣金

    /**
     * 2位数据类型码(默认00)+2位业务码
     *
     * @param dataType1  业务类型码
     * @param businessType1    数据类型码
     * @return
     */
    public static Integer generateType1(Integer businessType1, Integer dataType1) {
        return businessType1 * 100 + dataType1;
    }

//    public static void main(String[] args) {
//        CommissionVo commissionVo = new CommissionVo();
//        System.out.println(commissionVo.generateType1(
//                DATA_TYPE1_RED_ENVELOPE,
//                BUSINESS_COMMISSION_TYPE1));
//    }

    /**
     * 排序字段名
     */
    private String sortField;
    /***
     * 升序，降序
     */
    private String sortOrder; //DESC ,ASC
}
